// ignore_for_file: use_super_parameters, prefer_const_constructors

import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'controller.dart';

class StateWorkersView extends StatelessWidget {
  StateWorkersView({Key? key}) : super(key: key);
  
  final controller = WorkController();
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title:  Text('text'),
      ),
      body: Center(
        child: Column(
          children: <Widget>[
            GetX<WorkController>(
              init: controller,
              initState: (_) {
              },
              builder: (_){
                return Text("value -> ${_.obj}");
              }
            ),
            ElevatedButton(
              onPressed: () {
                controller.add();
              },
              child: const Text("add"),
            )
            
          ],
        ),
        
      ),
    );
  }
}